package com.example.demo;

import com.example.demo.netty.NettyServer;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.EventListener;

@SpringBootApplication
@Log4j2
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    @EventListener
    public void deployVerticle(ApplicationReadyEvent event) {
        log.info("spring application ready deploy Verticle");
        NettyServer nettyServer = new NettyServer();
        nettyServer.bootstrap();
    }


}
